#ifndef IMAGE3D_H
#define IMAGE3D_H

#include <QWidget>
#include <QHBoxLayout>
#include <QGraphicsScene>
#include <QTreeWidgetItem>
#include "graphicsview.h"
#include "gdcmqt.h"
#include "studyinfo.h"
namespace Ui {
  class ImageWidget;
}

class ImageWidget : public QWidget {
  Q_OBJECT

public:
  explicit ImageWidget(QWidget *parent = 0);
  ~ImageWidget();
  bool loadImage(const QString &filename);
  bool showImage(const QString &filename);
  void hideAllViews();
  void showAllViews();
  void showAxial();
  StudyInfo * getInfo() const;
  void setInfo(StudyInfo * value);

public slots:
  void receiveImagePath(QTreeWidgetItem * item, int column);
private slots:
  void on_radioButtonAxial_clicked();
  void on_radioButtonCoronal_clicked();
  void on_radioButtonSagittal_clicked();
  void on_radioButtonAll_clicked();

private:
  Ui::ImageWidget *ui;
  gdcm::Image gimage;
  StudyInfo * info;
  bool show2D();
  bool show3D();
  bool showCine();
};

#endif // IMAGE3D_H
